<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.org/schema/seam/taglib"
	xmlns:ice="http://www.icesoft.com/icefaces/component">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>JBoss Suites: Seam Framework</title>
	<link href="css/screen.css" rel="stylesheet" type="text/css" />
</h:head>

<body id="pgHome">

	<ice:panelGroup id="document">

		<div id="header">
			<ice:panelGroup id="title">
				<img src="img/hdr.title.gif"
					alt="JBoss Suites: ICEfaces-seam framework demo" />
			</ice:panelGroup>
		</div>

		<ice:panelGroup id="container">

			<div id="sidebar">
				<h1>Integrated multi-layer validation</h1>
				<p>Robust applications need data validation in several different
					places. Seam integrates Hibernate Validator, a set of annotations
					for expressing data model constraints in your domain model classes.
					Then, these constraints are applied almost completely transparently
					at three levels of the application: by Seam when the user first
					enters data, by EJB before persisting data to the database, and, if
					you use Hibernate to generate your database schema, by the database
					constraints themselves. Multi-layer validation hardens your
					application and protects your data. Even better, it's
					self-documenting, and easy to change when your business rules
					change.</p>
				<p>
					<a href="#"
						onclick="window.open('exp/registerExp.html','exp','width=752,height=500,scrollbars=yes');">
						What happens when I register? </a>
				</p>
			</div>

			<ice:panelGroup id="content">

				<div class="section">
					<h1>Register</h1>
				</div>

				<div class="section" style="overflow: auto">
					<div class="entry errors">
						<h:messages id="messages" globalOnly="true" />
					</div>

					<h:form id="registration">
						<fieldset>

							<s:decorate id="usernameDecorate" template="edit.xhtml">
								<ui:define name="label">Username:</ui:define>
								<ice:inputText id="username" value="#{user.username}"
									required="true" partialSubmit="true" />
							</s:decorate>

							<s:decorate id="nameDecorate" template="edit.xhtml">
								<ui:define name="label">Real Name:</ui:define>
								<ice:inputText id="name" value="#{user.name}" required="true"
									partialSubmit="true" />
							</s:decorate>

							<s:decorate id="passwordDecorate" template="edit.xhtml">
								<ui:define name="label">Password:</ui:define>
								<ice:inputSecret id="password" value="#{user.password}"
									redisplay="true" partialSubmit="true" required="true" />
							</s:decorate>

							<s:decorate id="verifyDecorate" template="edit.xhtml">
								<ui:define name="label">Verify Password:</ui:define>
								<ice:inputSecret id="verify" value="#{register.verify}"
									redisplay="true" partialSubmit="true" required="true" />
							</s:decorate>

							<div class="buttonBox">
								<ice:commandButton id="register" value="Register"
									action="#{register.register}" />
								&#160;
								<s:button id="cancel" value="Cancel" view="/home.xhtml" />
							</div>

						</fieldset>
					</h:form>

				</div>

			</ice:panelGroup>

		</ice:panelGroup>

		<div id="footer">Created with JBoss EJB 3, Seam, JSF 2 (Mojarra)</div>

	</ice:panelGroup>

</body>

</html>
